﻿@model Physis.Client.Models.Configuration.EnvironmentModel

@{ Layout = "~/Views/Configuration/ConfigurationItemMaster.cshtml"; }

<script type="text/javascript" src="~/Scripts/Application/Configuration/Environment.js"></script>

@section ItemPropertyTabsContent_GeneralProperties {

    No additional properties or settings available on this page. 

}

@section ItemPropertyTabs {
    
    <li><a href="#PropertyTab_Database">Database</a></li>

}

@section ItemPropertyTabsContent {

    <div id="PropertyTab_Database" class="PropertyTab TextNormal" style="padding: 8px;">
        
            <div class="ui-state-active" style="padding: 4px;">Connection</div>

            <div class="ui-widget-content" style="margin: 0px 0px 10px 0px; padding: 4px; line-height: 150%; border-top-width: 0px;">

                <table style="border-collapse:separate; border-spacing: 5px;" > 

                    <thead><tr><th style="width: 110px"></th><th></th></tr></thead>

                    <tr>

                        <td style="font-weight: bold;">Database Type: </td>

                        <td>
    
                            <select id="Environment_DatabaseConfiguration_DatabaseType" name="Environment.DatabaseConfiguration.DatabaseType">

                                <option value="0" selected="selected">Microsoft SQL Server</option>

                                <option value="1" disabled="disabled">Oracle</option>

                                <option value="2" disabled="disabled">PostgreSQL</option>

                            </select>

                        </td>

                    </tr>
        
                    <tr>

                        <td style="font-weight: bold;">Server Name:</td>

                        <td>@Html.TextBoxFor(model => model.Environment.DatabaseConfiguration.ServerName, new { maxlength=60 })</td>

                    </tr>
        
                    <tr>

                        <td style="font-weight: bold;">Database Name:</td>

                        <td>@Html.TextBoxFor(model => model.Environment.DatabaseConfiguration.DatabaseName, new { maxlength=60 })</td>

                    </tr>
                    
                    <tr>

                        <td style="font-weight: bold;">Custom Attributes:</td>

                        <td>@Html.TextBoxFor(model => model.Environment.DatabaseConfiguration.CustomAttributes, new { maxlength=99, style="width: 98%;"  })</td>

                    </tr>

                </table>

            </div>
        
            <div class="ui-state-active" style="padding: 4px;">Authentication</div>

            <div class="ui-widget-content" style="margin: 0px 0px 10px 0px; padding: 4px; line-height: 150%; border-top-width: 0px;">

                <table style="border-collapse:separate; border-spacing: 5px;" > 

                    <thead><tr><th style="width: 110px"></th><th></th></tr>

                    </thead>

                    <tr>

                        <td colspan="2">@Html.CheckBoxFor(model=>model.Environment.DatabaseConfiguration.TrustedConnection)<label for="Environment_DatabaseConfiguration_TrustedConnection" class="LabelHoverPointer" style="font-weight: bold;">Use Trusted Connection</label></td>

                    </tr>
        
                    <tr>

                        <td style="font-weight: bold;">User Name:</td>

                        <td>@Html.TextBoxFor(model => model.Environment.DatabaseConfiguration.UserName, new { maxlength=60 })</td>

                    </tr>
        
                    <tr>

                        <td style="font-weight: bold;">Password:</td>

                        <td>@Html.TextBoxFor(model => model.Environment.DatabaseConfiguration.Password, new { maxlength=60 })</td>

                    </tr>
                    
                </table>

            </div>
        
            <div class="ui-state-active" style="padding: 4px;">Connection Pooling</div>

            <div class="ui-widget-content" style="margin: 0px 0px 10px 0px; padding: 4px; line-height: 150%; border-top-width: 0px;">
                
                <table style="border-collapse:separate; border-spacing: 5px;" > 

                    <thead><tr><th style="width: 110px"></th><th></th></tr>

                    </thead>

                    <tr>

                        <td colspan="2">@Html.CheckBoxFor(model=>model.Environment.DatabaseConfiguration.PoolingEnabled)<label for="Environment_DatabaseConfiguration_PoolingEnabled" class="LabelHoverPointer" style="font-weight: bold;">Use Connection Pooling</label></td>

                    </tr>
        
                    <tr>

                        <td style="font-weight: bold;">Minimum Size:</td>

                        <td>@Html.TextBoxFor(model => model.Environment.DatabaseConfiguration.PoolSizeMinimum, new { maxlength=5 })</td>

                    </tr>
        
                    <tr>

                        <td style="font-weight: bold;">Maximum Size:</td>

                        <td>@Html.TextBoxFor(model => model.Environment.DatabaseConfiguration.PoolSizeMaximum, new { maxlength=5 })</td>

                    </tr>
                    
                </table>

            </div>

    </div>

    
}
